package cn.aloxc.tianya.reader;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Activity_test_broadAintent extends Activity {
	Button button1 = null;
	Button button2 = null;
	OnClickListener listener1 = null;
	OnClickListener listener2 = null;
	private static final String ACTION_1 = "cn.aloxc.tianya.reader.Activity_test_broadAintent_create";
	private static final String ACTION_2 = "cn.aloxc.tianya.reader.Activity_test_broadAintent_delete";
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.activity_test_broad_intent);
		listener1 = new View.OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(ACTION_1);
				sendBroadcast(intent);
			}
			
		};
		listener2 = new View.OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(ACTION_2);
				sendBroadcast(intent);
			}
			
		};	
		button1 = (Button)this.findViewById(R.id.test_broad_button1);
		button2 = (Button)this.findViewById(R.id.test_broad_button2);
		button1.setOnClickListener(listener1);
		button2.setOnClickListener(listener2);
	}
}
